import React from "react";
import ReactDOM from "react-dom";
import OldRoute from "./router/oldRoute";
// import Router from "./router";

// antd全局匹配
import { ConfigProvider, DatePicker, message } from "antd";
// 由于 antd 组件的默认文案是英文，所以需要修改为中文
import zhCN from "antd/lib/locale/zh_CN";
import moment from "moment";
import "moment/locale/zh-cn";
import "antd/dist/antd.css";
import "@/assets/index.css";

//导出react-redux 中内置的生产者组件
import { Provider as ReactProvider } from "react-redux";

// 自己的store.js文件
import store, { persistor } from "@/reducer/store";

import { PersistGate } from "redux-persist/integration/react";
moment.locale("zh-cn");

// console.log(React.Component.prototype);
ReactDOM.render(
  <ReactProvider store={store}>
    {/* 数据持久化的配置 也是 Provider（生产者）*/}
    <PersistGate loading={null} persistor={persistor}>
      <ConfigProvider locale={zhCN}>
        <OldRoute />
      </ConfigProvider>
    </PersistGate>
  </ReactProvider>,
  document.getElementById("root")
);
